﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MenuProject
{
    class Beverage : MenuItem
    {
        public double SmallPrice { get; private set; }
        public double MediumPrice { get; private set; }
        public double LargePrice { get; private set; }

        public Beverage(string name, double smallprice, double mediumprice, double largeprice) :base (name)
        {
            if (smallprice < 0)
                throw new ArgumentOutOfRangeException("Small price incorrect");
            SmallPrice = smallprice;
            if (mediumprice < 0)
                throw new ArgumentOutOfRangeException("Medium price incorrect");
            MediumPrice = mediumprice;
            if (largeprice < 0)
                throw new ArgumentOutOfRangeException("Large price incorrect");
            LargePrice = largeprice;

        }

        public override void PrintToConsole()
        {
            Console.WriteLine("{0}: - Small: {1}$; Medium: {2}$; Large: {3}$; ", Name, SmallPrice, MediumPrice, LargePrice);
        }
    }
}
